package memorphic.simpleloginsample.events
{
	import flash.events.Event;

	public class LoginEvent extends Event
	{
		
		
		public static const LOG_IN:String = "logIn";
		public static const LOG_OUT:String = "logOut";
		public static const LOG_IN_ERROR:String = "logInError";
		public static const REGISTER:String = "register";
		public static const REGISTER_ERROR:String = "registerError";
		
		public var userName:String;
		
		public var error:String;
		
		
		public function LoginEvent(type:String, userName:String, error:String="", bubbles:Boolean=false, cancelable:Boolean=false)
		{
			super(type, bubbles, cancelable);
			this.userName = userName;
			this.error = error;
		}
		
		
		
		public override function clone():Event
		{
			return new LoginEvent(type, userName, error, bubbles, cancelable);
		}
		
	}
}